-- SCDamageAction
-- create by chendh
-- 受创动作

SCDamageAction = class("SCDamageAction", function()
    return ActionBase.create();
end);

function SCDamageAction.create(target, skillId, damage, args)
    local self = SCDamageAction.new();
    self.target = target;
    self.damage = damage;
    self.skillId = skillId;
    self.args = args or {};
    return self;
end

-- 构造函数
function SCDamageAction:ctor()
end

-- 开始播放
function SCDamageAction:play()
    EventMgr.fire(event.SKY_COMBAT_DAMAGE, {
        ["target"] = self.target,
        ["skillId"] = self.skillId,
        ["damage"] = self.damage,
        ["args"] = self.args
    });

    return 0;
end

return SCDamageAction;